import request from "@/utils/request";

export function apiPanelList(params) {
    return request({
        url: "/sysadmin/panel/list",
        method: "get",
        params: params
    });
}

export function apiPanelCopy(data) {
    return request({
        url: "/sysadmin/panel/copy",
        method: "post",
        data: data
    });
}

export function apiPanelUpdate(data) {
    return request({
        url: "/sysadmin/panel/update",
        method: "post",
        data: data
    });
}

export function apiPanelAudit(data) {
    return request({
        url: "/sysadmin/panel/audit",
        method: "post",
        data: data
    });
}

export function apiDictList() {
    return request({
        url: "/sysadmin/dict/list",
        method: "get"
    });
}

export function apiRoleList() {
    return request({
        url: "/sysadmin/role/list",
        method: "get"
    });
}

export function apiRoleCopy(data) {
    return request({
        url: "/sysadmin/role/copy",
        method: "post",
        data: data
    });
}

export function apiRoleDetail(roldId) {
    return request({
        url: "/sysadmin/role/detail/" + roldId,
        method: "get"
    });
}

export function apiRoleUpdate(data) {
    return request({
        url: "/sysadmin/role/update",
        method: "post",
        data: data
    });
}

export function apiMenuGroupList() {
    return request({
        url: "/sysadmin/role/listMenuGroup",
        method: "get"
    });
}

export function apiRoleCreateMenuGroup(data) {
    return request({
        url: "/sysadmin/role/createMenuGroup",
        method: "post",
        data: data
    });
}

export function apiRoleListPanel() {
    return request({
        url: "/sysadmin/role/listPanel",
        method: "get"
    });
}

export function apiListParameter() {
    return request({
        url: "/sysadmin/role/listParameter",
        method: "get"
    });
}

export function apiRoleEnable(data) {
    return request({
        url: "/sysadmin/role/enable",
        method: "post",
        data: data
    });
}

export function apiRoleDisable(data) {
    return request({
        url: "/sysadmin/role/disable",
        method: "post",
        data: data
    });
}

export function apiUserList(data) {
    return request({
        url: "/sysadmin/user/list",
        method: "post",
        data: data
    });
}

export function apiUserCreate(data) {
    return request({
        url: "/sysadmin/user/create",
        method: "post",
        data: data
    });
}

export function apiUserListDepartment() {
    return request({
        url: "/sysadmin/user/listDepartment",
        method: "get"
    });
}

export function apiUserDisable(data) {
    return request({
        url: "/sysadmin/user/disable",
        method: "post",
        data: data
    });
}

export function apiUserEnable(data) {
    return request({
        url: "/sysadmin/user/enable",
        method: "post",
        data: data
    });
}

export function apiUserNewDepartment(data) {
    return request({
        url: "/sysadmin/user/newDepartment",
        method: "post",
        data: data
    });
}

//apiUserListRole
export function apiUserListRole() {
    return request({
        url: "/sysadmin/user/listRole",
        method: "get"
    });
}

export function apiUserNewRole(data) {
    return request({
        url: "/sysadmin/user/newRole",
        method: "post",
        data: data
    });
}

export function apiUserAudit(data) {
    return request({
        url: "/sysadmin/user/audit",
        method: "post",
        data: data
    });
}

export function apiUserPasswordReset(data) {
    return request({
        url: "/sysadmin/user/passwordReset",
        method: "post",
        data: data
    });
}
